<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>生日到现在有几个星期五</title>
</head>
<script>
	var both = new Date();
	// year=prompt("请输入生日年份 ");
	// month=prompt("请输入生日月份 ");
	// date=prompt("请输入生日日期 ");
	// both.setFullYear(year,month-1,date);
	both.setFullYear(1989,6,1);
	
	document.write(run(both));
	function run(both){
		var count=0;
		var day=24*60*60*1000
		var newDay=new Date(both.getTime()+day);
		var today= new Date();
		while(newDay.getTime()<=today.getTime()){
			if(newDay.getDay()==4){
				count++;
			}
			if ((newDay.getFullYear()%4==0&&newDay.getFullYear()%100!=0)||newDay.getFullYear()%400==0) {
				newDay=new Date(newDay.getTime()+366*day);
			}else{
				newDay=new Date(newDay.getTime()+365*day);
			}
		}
		return count;

	}
	
</script>
<body>
	
</body>
</html>